﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Qianli.DirSir.Model;
namespace 千里马后台
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IService1”。
    [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="u"></param>
        /// <returns></returns>
        int Login(Userinfo u);
        [OperationContract]
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="u"></param>
        /// <returns></returns>
        int Register(Userinfo u);
        [OperationContract]
        /// <summary>
        /// 显示商品信息
        /// </summary>
        /// <returns></returns>
        List<GoodsInfo> Goodshow();
        [OperationContract]
        /// <summary>
        /// 显示商品分类
        /// </summary>
        /// <returns></returns>
        List<GoodsTypeInfo> showGoodsType();
        [OperationContract]
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="ss"></param>
        /// <returns></returns>
        int addGoods(GoodsInfo ss);
        [OperationContract]
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int deleteGoods(int id);
        [OperationContract]
        /// <summary>
        /// 根据id获取goods表信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        /// 
        GoodsInfo GetGoodsByID(int id);
        [OperationContract]
        /// <summary>
        /// 修改物品信息
        /// </summary>
        /// <param name="g"></param>
        /// <returns></returns>
        /// 
        int UptGoods(GoodsInfo g);
        [OperationContract]
        /// <summary>
        /// 修改物品信息
        /// </summary>
        /// <param name="g"></param>
        /// <returns></returns>
        /// 
        List<GoodsInfo> SearchGoods(string GoodsName);

        [OperationContract]
        /// <summary>
        ///获取快递公司信息
        /// </summary>
        /// <returns></returns>
        List<DHLUPSFEDEXEMSInfo> GetDHLUPSFEDEXEMSInfo();
        #region 仓库类
        /// <summary>
        /// 显示仓库信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<StorehouseInfo> Storehouseshow();

        /// <summary>
        /// 仓库信息添加
        /// </summary>
        /// <param name="Shinfo"></param>
        /// <returns></returns>
        [OperationContract]
        int StorehouseAdd(StorehouseInfo Shinfo);
        /// <summary>
        /// 根据仓库ID获取仓库数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        StorehouseInfo StorehouseGetID(int id);
        /// <summary>
        /// 修改仓库信息
        /// </summary>
        /// <param name="Shinfo"></param>
        /// <returns></returns>
        [OperationContract]
        int StorehouseUpdate(StorehouseInfo Shinfo);
        /// <summary>
        /// 删除仓库信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        int StorehouseDelete(int id);
        /// <summary>
        /// 根据条件显示
        /// </summary>
        /// <param name="SthName"></param>
        /// <returns></returns>
        [OperationContract]
        List<StorehouseInfo> StorehouseInfoSelect(string SthName, string Sthcoding);
        #endregion

        [OperationContract]
        /// <summary>
        ///显示客户信息
        /// </summary>
        /// <returns></returns>
        List<CustomersInfo> ShowCustomersInfo();

        [OperationContract]
        /// <summary>
        ///添加客户信息
        /// </summary>
        /// <returns></returns>
        int AddCustomersInfo(CustomersInfo cust);
        [OperationContract]
        /// <summary>
        ///删除客户信息
        /// </summary>
        /// <returns></returns>
        int DelCustomersInfo(int id);

        [OperationContract]
        /// <summary>
        ///根据姓名搜索客户信息
        /// </summary>
        /// <returns></returns>
        List<CustomersInfo> GetCustomersInfoByCustomersName(string CustomersName);
        [OperationContract]
        /// <summary>
        ///城市信息
        /// </summary>
        /// <returns></returns>
        List<CityInfo> ShowCity();
        [OperationContract]
        /// <summary>
        ///根据id获取客户信息
        /// </summary>
        /// <returns></returns>
        CustomersInfo GetCustomersInfoByid(int id);
        [OperationContract]
        /// <summary>
        ///修改客户信息
        /// </summary>
        /// <returns></returns>
        int UptCustomersInfo(CustomersInfo cust);

        [OperationContract]
        /// <summary>
        ///添加快递公司信息
        /// </summary>
        /// <returns></returns>
        int AddDHLUPSFEDEXEMSInfo(DHLUPSFEDEXEMSInfo dh);
        [OperationContract]
        /// <summary>
        ///根据快递编号删除快递公司
        /// </summary>
        /// <returns></returns>
        int DelDHLUPSFEDEXEMSInfo(int id);
        [OperationContract]
        /// <summary>
        ///根据id搜索快递表信息
        /// </summary>
        /// <returns></returns>
        DHLUPSFEDEXEMSInfo getDHLUPSFEDEXEMSInfoByid(int id);
        [OperationContract]
        /// <summary>
        ///修改快递表信息
        /// </summary>
        /// <returns></returns>
        int UptDHLUPSFEDEXEMSInfo(DHLUPSFEDEXEMSInfo dh);
        [OperationContract]
        /// <summary>
        ///修改快递表信息
        /// </summary>
        /// <returns></returns>
        List<DHLUPSFEDEXEMSInfo> SearchDHLUPSFEDEXEMSInfo(string DHLUPSFEDEXEMSName);


        #region 供应商类
        [OperationContract]
        /// <summary>
        /// 供应商显示
        /// </summary>
        /// <returns></returns>
        List<ProviderInfo> ProviderInfoShow();
        [OperationContract]
        /// <summary>
        /// 添加供应商
        /// </summary>
        /// <param name="Shinfo"></param>
        /// <returns></returns>
        int ProviderInfoAdd(ProviderInfo Provd);
        [OperationContract]
        /// <summary>
        /// 根据id获取数据
        /// </summary>
        /// <param name="Proid"></param>
        /// <returns></returns>
        ProviderInfo ProviderInfoGetID(int Proid);
        [OperationContract]
        /// <summary>
        /// 修改供应商信息
        /// </summary>
        /// <param name="Provd"></param>
        /// <returns></returns>
        int ProviderInfoUpdate(ProviderInfo Provd);
        [OperationContract]
        /// <summary>
        /// 根据ID删除
        /// </summary>
        /// <param name="Proid"></param>
        /// <returns></returns>
        int ProviderInfoDelete(int Proid);
        [OperationContract]
        /// <summary>
        /// 模糊查询
        /// </summary>
        /// <param name="ProName"></param>
        /// <returns></returns>
        List<ProviderInfo> ProviderInfoSelect(string ProName);
        #endregion

        #region 采购订单
        [OperationContract]
        /// <summary>
        /// 采购订单显示
        /// </summary>
        /// <returns></returns>
        List<StockOrderInfo> StockOrderInfoShow();

        [OperationContract]
        /// <summary>
        /// 采购订单添加
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        List<int> AddStockOrderInfo(StockOrderInfo StockOrderInfo, List<PurchaseOrderSheetInfo> listPurchaseOrderSheetInfo);

        [OperationContract]
        /// <summary>
        /// 采购订单表删除
        /// </summary>
        /// <returns></returns>
        List<int> DelStockOrderInfo(int StockOrderID);

        [OperationContract]
        /// <summary>
        /// 查看订单表详细信息
        /// </summary>
        /// <param name="StockOrderID"></param>
        /// <returns></returns>
        List<PurchaseOrderSheetInfo> GetlistPurchaseOrderSheetInfoByStockOrderID(int StockOrderID);

        [OperationContract]
        /// <summary>
        /// 获取采购订单主表信息
        /// </summary>
        /// <param name="StockOrderID"></param>
        /// <returns></returns>
        StockOrderInfo GetStockOrderByStockOrderID(int StockOrderID);

        [OperationContract]
        /// <summary>
        /// 修改采购订单信息
        /// </summary>
        /// <returns></returns>
        List<int> UpdatePurchaseOrderSheetInfo(StockOrderInfo s, List<PurchaseOrderSheetInfo> listPurchaseOrderSheetInfo);

        [OperationContract]
        /// <summary>
        /// 获取供应商信息，填充到下拉列表中
        /// </summary>
        /// <returns></returns>
        List<ProviderInfo> GetProviderInfo();

        /// <summary>
        /// 根据采购订单模糊查询
        /// </summary>
        /// <param name="StockOrderName"></param>
        /// <returns></returns>
        [OperationContract]
        List<StockOrderInfo> GetStockOrderByStockOrderName(string DocumentsCoding);
        #endregion
    }
}
